import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/home'
import employeeList from '@/components/employee/employeeList'
import employeeAdd from '@/components/employee/employeeAdd'
import departmentList from '@/components/department/departmentList'
import departmentAdd from '@/components/department/departmentAdd'
import information from '@/components/information/information.vue'
import wage from '@/components/wage/wage.vue'
import myWage from '@/components/wage/myWage.vue'
import login from '@/components/user/login.vue'
import register from '@/components/register/register'
import qrcodeSign from  '@/components/qrcodeSign'
import getPsd from '@/components/user/getPsd'
import personal from '@/components/user/personal'


Vue.use(Router);

export default new Router({
    routes: [{
            path: '/home',
            meta: {
                title: ['主页'],
                index: 0
            },
            name: 'home',
            component: home
        },
      {
        path: '/personal',
        meta: {
          title: ['个人中心'],
          index: 5
        },
        name: 'personal',
        component: personal
      },
      {
        path:'/qrCode',
        name:'qrCode',
        meta: {
          title: ['扫码签到'],
          index: 99
        },
        component:qrcodeSign
      },
        {
            path: '/employee/list',
            meta: {
                title: ['主页', '班级管理', '班级列表'],
                index: 1
            },
            name: 'employeeList',
            component: employeeList
        },
        {
            path: '/employee/add',
            meta: {
                title: ['主页', '班级管理', '创建班级'],
                index: 1
            },
            name: 'employeeAdd',
            component: employeeAdd
        },
        {
            path: '/department/list',
            meta: {
                title: ['主页', '签到管理', '签到列表'],
                index: 2
            },
            name: 'departmentList',
            component: departmentList
        },
        {
            path: '/department/add',
            meta: {
                title: ['主页', '签到管理', '添加签到'],
                index: 2
            },
            name: 'departmentAdd',
            component: departmentAdd
        },
        {
            path: '/information',
            meta: {
                title: ['主页', '个人签到','签到列表'],
                index: 3
            },
            name: 'information',
            component: information
        },
        {
            path: '/wage',
            meta: {
                title: ['主页', '员工工资', '工资列表'],
                index: 4
            },
            name: 'wage',
            component: wage
        },
        {
            path: '/mywage',
            meta: {
                title: ['主页', '员工工资', '工资变化'],
                index: 4
            },
            name: 'myWage',
            component: myWage
        },
        {
            path: '/login',
            meta: {
                title: ['登录'],
                index: 99
            },
            name: 'login',
            component: login
        },
      {
        path: '/getpsd',
        meta: {
          title: ['找回密码'],
          index: 99
        },
        name: 'getpsd',
        component: getPsd
      },
      {
        path:'/register',
        meta: {
          title: ['注册'],
          index: 99
        },
        name:'register',
        component:register
      },
        {
            path: '/',
            redirect: '/home'
        }
    ]
})
